package com.corpgovernment.organization.dataloader.db;

import com.corpgovernment.job.dao.entity.db.EmployeeJobRelationDo;
import com.corpgovernment.job.dao.mapper.EmployeeJobRelationMapper;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

/***
 * @author zwmao
 * @version 1.0.0
 * @date 2024/5/22
 **/
@Component
public class MbEmployeeJobRelationLoader {
    @Resource
    private EmployeeJobRelationMapper employeeJobRelationMapper;

    public List<EmployeeJobRelationDo> listEmployeeJobRelationByJobIdList(List<Long> jobIdList){
        Example example = new Example(EmployeeJobRelationDo.class);
        example.createCriteria().andIn("jobId", jobIdList);
        return employeeJobRelationMapper.selectByExample(example);
    }
}
